package com.wyj.event;

import com.wyj.config.RabbitConfig;
import lombok.extern.log4j.Log4j2;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@RabbitListener(queues = RabbitConfig.QUEUE_FIRST)
@Log4j2
public class RabbitConsumer {
    /**
     * 其实消费者这里注入容器并无实际意义，因为我们消费者是供业务调用，消费者只是处理生产者的消息即可
     */
    @RabbitHandler
    public void process(String msg) {
        System.out.println("===================="+msg);
    }


}
